package String;

import java.util.Scanner;

public class stringBuilder_2 {
    public static void main(String[] args) {
   //链式编程
      /*  String str=getString().substring(1);
      System.out.println(str);
      取第一位后面的内容*/
       int a= getString().substring(1).replace("A","Q").length();
    System.out.println(a);
    }

    public static String getString() {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter a string: ");
        String s = sc.nextLine();
        return s;
    }
}
